linux: Force build failure if modules build fails
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Dec 2007 10:44:06 +0000 (10:44 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Dec 2007 10:44:06 +0000 (10:44 +0000)
When building a linux kernel, if the modules build fails, then
the build carries on regardless.

The problem is simple - the "make modules" failure is not seen
by the calling make since its return value is not what is
returned.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
buildconfigs/mk.linux-2.6-common

index cd02d9ce4331fc310a381c9ed5423d45376c21cc..2fa7052b2b3800b00209e819b70a2f1b8b1098c8 100644 (file)
@@ -59,7 +59,7 @@ ifneq ($(XEN_LINUX_ALLOW_INTERFACE_MISMATCH),y)
        fi
 endif
        if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
+           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules || exit 1 ; \
            $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
        fi
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)